const state = () => ({
	token: '',
	userInfo: {}
})
const mutations = {
	SET_TOKEN(state, value) {
		state.token = value
		uni.setStorageSync('token', value)
	},
	SET_User_Inof(state, value) {
		state.userInfo = value
		uni.setStorageSync('UserInof', value)
	},
	RESET_INFO(state, value) {
		state.token = ''
		state.userInfo = ''
	}
}
const actions = {
	LOGOUT({commit}){
		uni.removeStorageSync('token');
		uni.removeStorageSync('UserInof');
		uni.removeStorageSync('UserExtDetail');
		// uni.clearStorageSync()
		commit('RESET_INFO')
	}
}
export default {
	namespaced: true,
	state,
	mutations,
	actions
}